furny.jme.node
Class Grid

java.lang.Object
  extended by com.jme3.scene.Spatial
      extended by com.jme3.scene.Node
          extended by furny.jme.node.Grid
All Implemented Interfaces:
com.jme3.asset.CloneableSmartAsset, com.jme3.collision.Collidable, com.jme3.export.Savable, java.lang.Cloneable

public class Grid
extends com.jme3.scene.Node

This is a rectangular grid composed of lines.

Since:
11.08.2012
Author:
Stephan Dreyer

Nested Class Summary
 
Nested classes/interfaces inherited from class com.jme3.scene.Spatial
com.jme3.scene.Spatial.BatchHint, com.jme3.scene.Spatial.CullHint
 
Field Summary
private  float lineWidth
           
private static float MAJOR_TICK_SIZE
           
private static float MINOR_TICK_SIZE
           
 
Fields inherited from class com.jme3.scene.Node
children
 
Fields inherited from class com.jme3.scene.Spatial
batchHint, controls, cullHint, frustrumIntersects, key, localLights, localTransform, name, parent, queueBucket, queueDistance, refreshFlags, RF_BOUND, RF_LIGHTLIST, RF_TRANSFORM, shadowMode, userData, worldBound, worldLights, worldTransform
 
Constructor Summary
Grid(com.jme3.math.Vector3f size, float minorTickStep, float majorTickStep, com.jme3.asset.AssetManager assetManager)
          Creates a new grid.
Grid(com.jme3.math.Vector3f size, float minorTickStep, float majorTickStep, float lineWidth, com.jme3.asset.AssetManager assetManager)
          Creates a new grid.
 
Method Summary
private  void addLine(java.lang.String name, com.jme3.math.Vector3f start, com.jme3.math.Vector3f end)
          Adds one line to this node.
private  void addTicks(com.jme3.math.Vector3f start, com.jme3.math.Vector3f end, float minorTickStep, float majorTickStep)
          Adds ticks between start and end to the node.
 
Methods inherited from class com.jme3.scene.Node
attachChild, attachChildAt, breadthFirstTraversal, clone, collideWith, deepClone, depthFirstTraversal, descendantMatches, descendantMatches, descendantMatches, detachAllChildren, detachChild, detachChildAt, detachChildNamed, getChild, getChild, getChildIndex, getChildren, getQuantity, getTriangleCount, getVertexCount, hasChild, read, setLightListRefresh, setLodLevel, setMaterial, setModelBound, setTransformRefresh, swapChildren, updateGeometricState, updateLogicalState, updateModelBound, updateWorldBound, write
 
Methods inherited from class com.jme3.scene.Spatial
addControl, addLight, breadthFirstTraversal, center, checkCulling, clone, forceRefresh, getBatchHint, getControl, getControl, getCullHint, getKey, getLastFrustumIntersection, getLocalBatchHint, getLocalCullHint, getLocalLightList, getLocalQueueBucket, getLocalRotation, getLocalScale, getLocalShadowMode, getLocalToWorldMatrix, getLocalTransform, getLocalTranslation, getName, getNumControls, getParent, getQueueBucket, getShadowMode, getUserData, getUserDataKeys, getWorldBound, getWorldLightList, getWorldRotation, getWorldScale, getWorldTransform, getWorldTranslation, hasAncestor, localToWorld, lookAt, matches, move, move, removeControl, removeControl, removeFromParent, removeLight, rotate, rotate, rotateUpTo, runControlRender, scale, scale, setBatchHint, setBoundRefresh, setCullHint, setKey, setLastFrustumIntersection, setLocalRotation, setLocalRotation, setLocalScale, setLocalScale, setLocalScale, setLocalTransform, setLocalTranslation, setLocalTranslation, setName, setParent, setQueueBucket, setShadowMode, setUserData, toString, updateWorldLightList, updateWorldTransforms, worldToLocal
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

MINOR_TICK_SIZE

private static final float MINOR_TICK_SIZE
See Also:
Constant Field Values

MAJOR_TICK_SIZE

private static final float MAJOR_TICK_SIZE
See Also:
Constant Field Values

lineWidth

private final float lineWidth
Constructor Detail

Grid

public Grid(com.jme3.math.Vector3f size,
            float minorTickStep,
            float majorTickStep,
            com.jme3.asset.AssetManager assetManager)
Creates a new grid.

Parameters:
size - The vector that defines with and height of the grid.
minorTickStep - Distance to draw a minor step.
majorTickStep - Distance to draw a major step.
assetManager - The asset manager.
Since:
11.08.2012

Grid

public Grid(com.jme3.math.Vector3f size,
            float minorTickStep,
            float majorTickStep,
            float lineWidth,
            com.jme3.asset.AssetManager assetManager)
Creates a new grid.

Parameters:
size - The vector that defines with and height of the grid.
minorTickStep - Distance to draw a minor step.
majorTickStep - Distance to draw a major step.
lineWidth - The width of the lines.
assetManager - The asset manager.
Since:
11.08.2012
Method Detail

addTicks

private void addTicks(com.jme3.math.Vector3f start,
                      com.jme3.math.Vector3f end,
                      float minorTickStep,
                      float majorTickStep)
Adds ticks between start and end to the node.

Parameters:
start - The start vector.
end - The end vector.
minorTickStep - Distance to draw a minor step.
majorTickStep - Distance to draw a major step.
Since:
11.08.2012

addLine

private void addLine(java.lang.String name,
                     com.jme3.math.Vector3f start,
                     com.jme3.math.Vector3f end)
Adds one line to this node.

Parameters:
name - Name of the line
start - Start point of line.
end - End point of line.
Since:
11.08.2012